Re: Suggestion for optimization - Mailing list pgsql-hackers

From Peter Bierman
Subject Re: Suggestion for optimization
Date
Msg-id v03130301b8d3bfb83d00@[17.202.21.231]
Whole thread Raw
In response to Re: Suggestion for optimization  ("Dann Corbit" <DCorbit@connx.com>)
Responses Re: Suggestion for optimization
List pgsql-hackers
At 12:08 PM -0800 4/5/02, Dann Corbit wrote:
>I guess that this model can be viewed as "everything is a snapshot".
>It seems plain that the repercussions for a data warehouse and for 
>reporting have not been thought out very well.  This is definitely
>very, very bad in that arena.  I suppose that reporting could still
>be accomplished, but it would require pumping the data into a new
>copy of the database that does not allow writes at all.  Yuck.

That is exactly the point of MVCC. When you start your reporting cycle, you initiate a transaction. That transaction
causesthe database to _act_ as if you had "pump[ed] the data into a new copy of the database that does not allow writes
atall."
 

Your transaction is isolated from ongoing activities in the database. Your transaction _is_ a snapshot of the database
atsome instant in time.
 

This is a good thing. You should probably ponder it for a while before claiming it hasn't been thought out well wrt.
certainapplications.
 


Still, your suggestion _could_ be implemented. Your comment: "An accurate
cardinality figure can greatly enhance the optimizer's ability to
perform joins in the correct order" was intriguing, and I'd be interested in Tom's thoughts on just that bit.

-pmb




pgsql-hackers by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Suggestion for optimization
Next
From: "Dann Corbit"
Date:
Subject: Re: Suggestion for optimization